package com.qdlc.p2p.biz.service;

import com.qdlc.p2p.dal.dto.Borrow;
import com.qdlc.p2p.dal.dto.BorrowRepayment;
import com.qdlc.p2p.dal.model.BorrowModel;

/**
 * @author wuaj
 * @version 1.1.0.0
 * @date 2016年03月17日
 */
public interface AutoBorrowService {

    /**
     * 还款
     *
     * @param borrowRepayment
     */
    void autoBorrowRepay(BorrowRepayment borrowRepayment);

    /**
     * 网站垫付
     *
     * @param borrowRepayment
     */
    public void webAdvance(BorrowRepayment borrowRepayment);

    /**
     * 前台逾期垫付
     *
     * @param borrowRepayment
     */
    public void overduePayment(BorrowRepayment borrowRepayment);

    /**
     * 提前还款
     *
     * @param borrowRepayment
     */
    public void doPriorRepay(BorrowRepayment borrowRepayment);

    /**
     * 自动投标
     *
     * @param model
     * @throws Exception
     */
    void autoDealTender(BorrowModel model) throws Exception;

    /**
     * 满标复审
     *
     * @throws Exception
     */
    void autoVerifyFull(Borrow borrow) throws Exception;

    /**
     * 撤回标处理
     *
     * @param borrow
     */
    public void autoCancel(Borrow borrow);

    /**
     * 代偿成功后处理
     *
     * @param borrowRepayment
     */
    void autoCompensateSuccess(BorrowRepayment borrowRepayment);

    void updateStatus(long id, int status, int preStatus);

}
